home *** CD-ROM | disk | FTP | other *** search
- ACPP(5) Last changed: 1-5-99
-
-
- NNAAMMEE
- aaccpppp - ANSI C language preprocessor
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- IRIX systems
-
- DDEESSCCRRIIPPTTIIOONN
- The use of the aaccpppp command is not recommended, because the
- functionality of aaccpppp has been moved into the C front-end and aaccpppp may
- not be supported in future releases. See mm44(1) for a general macro
- processor.
-
- The aaccpppp preprocessor is a version of GNU ccpppp. To see which version,
- enter aaccpppp --vv. The source code to the preprocessor is distributed in
- 4Dgifts.
-
- This is intended only as a general statement of the preprocessor's
- capabilities. For a more precise statement, see the C language
- standard (reference cited at the end of this manual page).
-
- The following options are recognized directly by aaccpppp:
-
- --PP Preprocess the input without producing the line control
- information used by the next pass of the C compiler. The
- compiler driver, cccc, defines appropriate symbols.
-
- --DD_n_a_m_e
- --DD_n_a_m_e=_d_e_f
- Define _n_a_m_e with value _d_e_f as if by a ##ddeeffiinnee. If no =_d_e_f is
- given, _n_a_m_e is defined with value 1. The --DD option has lower
- precedence than the --UU option. That is, if the same name is
- used in both a --UU option and a --DD option, the name will be
- undefined regardless of the order of the options.
-
- --II_d_i_r Change the algorithm for searching for ##iinncclluuddee files whose
- names do not begin with // to look in _d_i_r before looking in the
- directories on the standard list. Thus, ##iinncclluuddee files whose
- names are enclosed in double quotation marks will be searched
- for first in the directory of the file with the ##iinncclluuddee line
- then in the directories named in --II options, and last in
- directories on a standard list. For ##iinncclluuddee files whose
- names are enclosed in <<>>, the directory of the file with the
- ##iinncclluuddee line is not searched. If --II is given with no _d_i_r
- specified, aaccpppp is instructed to suppress the search of the
- standard list of include directories (this form is obsolete,
- use --nnoossttddiinncc instead). This standard list consists only of
- //uussrr//iinncclluuddee.
-
- --UU_n_a_m_e Undefines _n_a_m_e, which is only useful if _n_a_m_e is defined via --DD
- or is a predefined name. The order of the --DD and is not
- significant; the undefines are done after all the --DDs and
- predefines are applied.
-
- --ppeeddaannttiicc
- All ANSI constraints are obeyed when this option is specified.
- Howver, only one ##eellssee or ##eennddiiff with extra tokens after the
- name is reported per included file to reduce the number of
- error reports on older header files.
-
- --ttrraaddiittiioonnaall
- Allows dollar sign ($) in identifiers and makes aaccpppp behave
- like a traditional C preprocessor as defined in _T_h_e _C
- _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l.
-
- --MM The names of directly included files are printed on standard
- output.
-
- --CC Comments are retained in the output of aaccpppp.
-
- --nnoossttddiinncc
- The standard places are not searched for include files. Use
- --II to specify directories to search.
-
- Ordinarily, only options mentioned on the cccc(1) man page are
- of interest. However aaccpppp has the following options not
- recognized by cccc which can be applied with the cccc flag prefix,
- --WWpp. For example, to apply the aaccpppp-only option --WWaallll,
- specify cccc --WWpp,,--WWaallll.
-
-
- --pp All ANSI C constraints are obeyed. If supplied twice, ##iiddeenntt
- preprocessing directives produce a warning. Any option
- starting with --pp is considered to mean --ppeeddaannttiicc (see the
- --ppeeddaannttiicc description).
-
- --oo _o_u_t__f_n_a_m_e
- The output is written to _o_u_t__f_n_a_m_e instead of stdout.
-
- --ttrraaddiittiioonnaall
- Allows dollar sign ($) in identifiers and makes aaccpppp behave
- like a traditional C preprocessor as defined in Kernighan &
- Ritchie, First Edition.
-
- --ttrriiggrraapphhss
- Turns on processing of trigraphs.
-
- --BB Means there is a different, longer, list of default
- directories to search. And C++ // is understood as a
- introducing a comment.
-
- --++ Means there is a different, longer, list of default
- directories to search. And C++ // is understood as a
- introducing a comment.
-
- --WWttrriiggrraapphhss
- Warns if any trigraphs are encountered in the text.
-
- --WWccoommmmeennttss
- Warns if a comment start is found within a comment.
-
- --WWccoommmmeenntt
- Warns if a comment start is found within a comment.
-
- --WWaallll This is the same as having both --WWttrriiggrraapphhss and --WWccoommmmeennttss.
-
- --MM The names of directly included files are printed on standard
- output.
-
- --MMMM The names of included files at all nesting levels are printed
- on standard output.
-
- --dd Instead of writing the preprocessed file out, writes the names
- and values of all preprocessor macros defined.
-
- --vv Prints the GNU CPP version number.
-
- --CC Comments are retained in the output of aaccpppp.
-
- --$$ Dollar signs are allowed in identifiers.
-
- --nnoosspplliiccee
- Turn backslash newline into newline when outputting defines,
- but does not consider them to end the macro definition.
-
- --nnoossttddiinncc
- The standard places are not searched for include files. Use
- --II to specify directories to search.
-
- --uu Inhibits predefinition of values. If not supplied, the names
- mmiippss and uunniixx are predefined. cccc --aannssii passes --uu to aaccpppp.
-
- --ww Turns off warning messages.
-
- --sshhoowwddeeffiinneess
- Show each ##ddeeffiinnee (##uunnddeeff) followed by the line number and
- file name where it is appears. The first few defines shown
- are the predefines builtin to ccpppp and passed on the command
- line (for these the line number and file name are
- meaningless). This facility is to assist you in the special
- situation where you have a ##ddeeffiinnee (##uunnddeeff) and you are having
- difficulty determining which source file it is in. Use any
- standard text tool to inspect the result file.
-
- Example:
-
- cc -ansi -E -Imyincludedir -Wp,-showdefines myfile.c >myresult
-
-
- -- As a file name, -- is treated as a file name (stdin or stdout).
-
- Some special names are understood by aaccpppp. The name ____LLIINNEE____ is
- defined as the current line number (as a decimal integer) as known by
- aaccpppp, and ____FFIILLEE____ is defined as the current file name (as a C string)
- as known by aaccpppp. The name ____DDAATTEE____ is defined as the date of
- translation of the source file (a character string literal of the form
- MMmmmmmm dddd yyyyyyyy, where the names of the months are the same as those
- generated by the aassccttiimmee(3) function, and the first character of dddd is
- a space character if the value is less than 10). The name ____TTIIMMEE____ is
- defined as the time of translation of the source file (a character
- string literal of the form hhhh::mmmm::ssss as in the time generated by the
- aassccttiimmee(3) function). They can be used anywhere (including in macros)
- just as any other defined name.
-
- To distinguish itself from ccpppp(1), aaccpppp defines the macro
- ____AANNSSII__CCPPPP____, setting its value to one.
-
- All aaccpppp directive lines start with any number of blanks and tabs
- followed by ##. Any number of blanks and tabs are allowed between the
- ## and the directive. The directives are:
-
-
- ##ddeeffiinnee _n_a_m_e _t_o_k_e_n-_s_t_r_i_n_g
- Replace subsequent instances of _n_a_m_e with _t_o_k_e_n-_s_t_r_i_n_g.
-
- ##ddeeffiinnee _n_a_m_e( _a_r_g, ..., _a_r_g )_t_o_k_e_n-_s_t_r_i_n_g
- Notice that there can be no space between _n_a_m_e and the (.
- Replace subsequent instances of _n_a_m_e followed by a (, a list of
- comma-separated sets of tokens, and a ) followed by _t_o_k_e_n-_s_t_r_i_n_g,
- where each occurrence of an _a_r_g in the _t_o_k_e_n-_s_t_r_i_n_g is replaced
- by the corresponding set of tokens in the comma-separated list.
- When a macro with arguments is expanded, the arguments are placed
- into the expanded _t_o_k_e_n-_s_t_r_i_n_g unchanged. After the entire
- _t_o_k_e_n-_s_t_r_i_n_g has been expanded, aaccpppp restarts its scan for names
- to expand at the beginning of the newly created _t_o_k_e_n-_s_t_r_i_n_g.
- The ## preprocessing token turns the immediately following
- argument in _t_o_k_e_n-_s_t_r_i_n_g into a string literal (i.e., enclosed in
- double quotation marks) which contains the spelling of the
- argument (see the following example). The #### preprocessing token
- causes the preceeding preprocessing token to be concatenated with
- the following preprocessing token into a single preprocessing
- token available for further replacement. Either or both of the
- preprocessing tokens may be substituted macro arguments. As an
- example of the ## and #### operators, the following sequence:
-
- #define quote(arg) # arg
- #define glue_to_b(a) a ## b
- quote(foo)
- glue_to_b(b_follows_me)
-
- creates the following output:
-
- "foo"
- b_follows_meb
-
-
- ##uunnddeeff _n_a_m_e
- Causes the definition of _n_a_m_e (if any) to be forgotten from now
- on. No additional tokens are permitted on the directive line
- after _n_a_m_e.
-
- ##iiddeenntt "_s_t_r_i_n_g"
- The _s_t_r_i_n_g and the directive are silently ignored. No output is
- produced for this directive.
-
- ##pprraaggmmaa
- The directive and whatever follows it on the line is passed to
- the output in a slightly modified form which is not documented.
- The form may change in a future release.
-
- ##pprraaggmmaa oonnccee
- If this directive appears in an included file, the file will
- never be included again, even if there is another ##iinncclluuddee of
- this file. No tokens or comments are permitted after the oonnccee
- keyword. Using ##pprraaggmmaa oonnccee is more efficient than using macro
- wrappers, because the included file is not rescanned, but it may
- not be portable to third-party preprocessors.
-
- ##iinncclluuddee "_f_i_l_e_n_a_m_e"
- ##iinncclluuddee <_f_i_l_e_n_a_m_e>
- At this point, include the contents of _f_i_l_e_n_a_m_e (which will then
- be run through aaccpppp). When the <_f_i_l_e_n_a_m_e> notation is used,
- _f_i_l_e_n_a_m_e is only searched for in the standard places. See the --II
- option above for more detail. No additional tokens are permitted
- on the directive line after the final quotation mark or >.
-
- ##lliinnee _i_n_t_e_g_e_r-_c_o_n_s_t_a_n_t "_f_i_l_e_n_a_m_e"
- Causes aaccpppp to generate line control information for the next
- pass of the C compiler. _i_n_t_e_g_e_r-_c_o_n_s_t_a_n_t is the line number of
- the next line and _f_i_l_e_n_a_m_e is the file from which it comes. If
- "_f_i_l_e_n_a_m_e" is not specified, the current file name is unchanged.
- No additional tokens are permitted on the directive line after
- the optional _f_i_l_e_n_a_m_e.
-
- ##eennddiiff
- Ends a section of lines begun by a test directive (##iiff,, ##iiffddeeff,
- or ##iiffnnddeeff). Each test directive must have a matching ##eennddiiff.
- No additional tokens are permitted on the directive line. To
- reduce the volume of error reports on older header files, aaccpppp
- reports only one instance of additional tokens per included file.
-
- ##iiffddeeff _n_a_m_e
- The lines following this option will appear in the output if _n_a_m_e
- has been the subject of a previous ##ddeeffiinnee without being the
- subject of an intervening ##uunnddeeff. No additional tokens are
- permitted on the directive line after _n_a_m_e.
-
- ##iiffnnddeeff _n_a_m_e
- The lines following this option will appear in the output if _n_a_m_e
- has not been the subject of a previous ##ddeeffiinnee. No additional
- tokens are permitted on the directive line after _n_a_m_e.
-
- ##iiff _c_o_n_s_t_a_n_t-_e_x_p_r_e_s_s_i_o_n
- Lines following this option will appear in the output if the
- _c_o_n_s_t_a_n_t-_e_x_p_r_e_s_s_i_o_n evaluates to non-zero. All binary non-
- assignment C operators, the ?: operator, the unary -, !, and ~
- operators are all legal in _c_o_n_s_t_a_n_t-_e_x_p_r_e_s_s_i_o_n. The precedence
- of the operators is the same as defined by the C language. There
- is also a unary operator ddeeffiinneedd, which can be used in _c_o_n_s_t_a_n_t-
- _e_x_p_r_e_s_s_i_o_n in these two forms: ddeeffiinneedd ( _n_a_m_e ) or ddeeffiinneedd _n_a_m_e.
- This allows the utility of ##iiffddeeff and ##iiffnnddeeff in a ##iiff directive.
- Only these operators, integer constants, and names which are
- known by aaccpppp should be used in _c_o_n_s_t_a_n_t-_e_x_p_r_e_s_s_i_o_n. The ssiizzeeooff
- operator is not available.
-
- For example, to test whether either of two symbols, _f_o_o and _f_u_m,
- are defined, specify the following:
-
- #if defined(foo) || defined(fum)
-
- ##eelliiff _c_o_n_s_t_a_n_t-_e_x_p_r_e_s_s_i_o_n
- This is equivalent to specifying ##eellssee with a ##iiff expression, and
- is often more convenient than a nested ##eellssee ##iiff ccoonnssttaanntt--
- eexxpprreessssiioonn ##eennddiiff ##eennddiiff.
-
- ##eellssee
- The lines following this option will appear in the output if
- preceding test directive evaluates to zero. No additional tokens
- are permitted on the directive line. To reduce the volume of
- error reports on older header files, aaccpppp reports only one
- instance of additional tokens per included file.
-
- The test directives and the possible ##eellssee directives can be
- nested.
-
- ##eerrrroorr _p_r_e_p_r_o_c_e_s_s_i_n_g-_t_o_k_e_n_s
- The preprocessing tokens are emitted and an error is signaled to
- cccc.
-
- ##iiddeenntt
- This System V directive is silently accepted and ignored unless
- --ppeeddaannttiicc is supplied twice, in which case a warning is issued
- for each ##iiddeenntt encountered.
-
- ##ssccccss
- This is a BSD-only directive. Use of it creates an error.
-
- FFIILLEESS
- //uussrr//iinncclluuddee Standard directory list for ##iinncclluuddee files
-
- NNOOTTEESS
- Two often-used capabilities of the older C preprocessor ccpppp(1) have a
- different syntax in aaccpppp(5). These are enclosing a macro argument in
- double-quotes, and concatenating tokens. See the discussion of
- ##ddeeffiinnee for the new syntax.
-
- SSEEEE AALLSSOO
- cccc(1), ccpppp(1), lliinnee(1), mm44(1)
-
- AAmmeerriiccaann NNaattiioonnaall CCSSttaannddaarrdd ffoorr IInnffoorrmmaattiioonn SSyysstteemmss -- PPrrooggrraammmmiinngg
- LLaanngguuaaggee - C, ANSI X3.159-1989
-
- This man page is available only online.
-